<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>发布视频课程</title>
</head>
<script type="text/javascript">
function isInteger(obj) {
    return obj%1 === 0
}

function check(){
var month=releaseCourse_form.uploadTimeMonth.value;
var day=releaseCourse_form.uploadTimeDay.value;
if(isInteger(month)&&isInteger(day)&&day>0&&day<=31&&month>0&&month<=12){
	return true;
}
else{
	alert("上传日期有误，无法上传");
	return false;
}
}

</script>
<body>
<%
String uploader_id="";
if(session.getAttribute("loginedsession")!=null){
	uploader_id=session.getAttribute("loginedsession").toString();
}
%>
<link href="<%=request.getContextPath() %>/css/backstage.css" rel="stylesheet" type="text/css" />
<div class="header">
		<font size="6" color="#62A8EA"><br />&emsp;&emsp;&emsp;发布视频课程</font>
	</div>
	<div class="body">
		<form action="../UploadControl/videoupload" method="post"
			enctype="multipart/form-data" name="upload_video_form" onsubmit="return check();">
			<table class="dataintable">
			<input type="hidden" name="uploadType" value="video"/>
				<tr>
					<td align="center">上传者：</td>
					<td colspan="6"><input type="text" 
						value=<%=uploader_id%>
						name="uploader"></td>
				</tr>
				<tr>
					<td align="center">请选择上传视频：</td>
					<td colspan="6"><input type="file" name="videofile"></td>
				</tr>	
				<tr><td align="center">请选择标签：</td>
				<td colspan="6"><select name="video_label">
				<option value="编程与开发">编程与开发</option>
				<option value="产品与运营">产品与运营</option>
				<option value="电商运营">电商运营</option>
				<option value="设计创意">设计创意</option>
				<option value="职场通用技能">职场通用技能</option>
				<option value="AI与数据科学">AI与数据科学</option>
				</select></td></tr>
				<tr><td align="center">视频名称：</td>   <!-- 上传文件时一定要在后面加上文件类型,eg:c语言程序设计.zip -->
				<td colspan="6"><input type="text" name="video_name"></td></tr>
				<tr><td align="center">上传时间：</td>
				<td><input type="text" name="uploadTimeYear"></td><td>年</td>
				<td><input type="text" name="uploadTimeMonth"></td><td>月</td>
				<td><input type="text" name="uploadTimeDay"></td><td>日</td>
				</tr>
				<tr><td align="center">简介：</td><td colspan="6"><textarea name="brief_introduce" rows="6" cols="50"></textarea></td></tr>
				<tr>
					<td align="center" colspan="7"><input type="submit"
						class="mybutton" value="上传"></td>
				</tr>
			</table>
		</form>
	</div>
	
	<div class="body">
		<form action="../UploadControl/pictureupload" method="post"
			enctype="multipart/form-data" name="upload_picture_form">
			<table class="dataintable">
			<input type="hidden" name="uploadType" value="picture"/>
				<tr>
					<td align="center">请选择上传图片：</td>
					<td colspan="6"><input type="file" name="picturefile"></td>
				</tr>
				<tr><td align="center">图片名称：</td>   <!-- 上传文件时一定要在后面加上文件类型,eg:c语言程序设计.zip -->
				<td colspan="6"><input type="text" name="picture_name"></td></tr>	
				<tr>
					<td align="center" colspan="7"><input type="submit"
						class="mybutton" value="上传"></td>
				</tr>
			</table>
		</form>
	</div>
	
	<div class="body">
		<form action="../UploadControl/appendixupload" method="post"
			enctype="multipart/form-data" name="upload_appendix_form">
			<table class="dataintable">
			<input type="hidden" name="uploadType" value="appendix"/>
				<tr>
					<td align="center">请选择上传附件：</td>
					<td colspan="6"><input type="file" name="appendixfile"></td>
				</tr>
				<tr><td align="center">图片名称：</td>   <!-- 上传文件时一定要在后面加上文件类型,eg:c语言程序设计.zip -->
				<td colspan="6"><input type="text" name="appendix_name"></td></tr>		
				<tr>
					<td align="center" colspan="7"><input type="submit"
						class="mybutton" value="上传"></td>
				</tr>
			</table>
		</form>
	</div>
	
</body>
</html>